// 放置全局指令
import Vue from "vue";
import store from "@/store";
const adminPerms = '*:*:*'
Vue.directive('permission',{
    // bindinging.value可以接受外部传递的值
    inserted(el,binding){
        
        const perms = store.state.permission.profile
        if(perms.includes(adminPerms)){
            return
        }
        if(!perms.includes(binding.value)){
            // el.style.display = 'none'
            el.remove()
        }
    }
})